-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: configurable choice of annotations for rolling update revision #1303
feat: configurable choice of annotations for rolling update revision #1303
Conversation
@@ -237,7 +237,7 @@ Java | |||
|
|||
#### Configuration | |||
|
|||
The following configuration is required, more details for each and additional configurations can be found in [reference.conf](https://github.com/akka/akka-management/blob/main/rolling-updates-kubernetes/src/main/resources/reference.conf): | |||
The following configuration is required, more details for each and additional configurations can be found in [reference.conf](https://github.com/akka/akka-management/blob/main/rolling-update-kubernetes/src/main/resources/reference.conf): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how long the typo has been there...
I think the comment in reference.conf
is sufficient documentation for a niche feature.
...g-update-kubernetes/src/main/scala/akka/rollingupdate/kubernetes/KubernetesJsonSupport.scala
Outdated
Show resolved
Hide resolved
implicit val replicaAnnotationFormat: JsonFormat[ReplicaAnnotation] = jsonFormat1(ReplicaAnnotation.apply) | ||
implicit val replicaAnnotationFormat: RootJsonFormat[ReplicaAnnotation] = | ||
new RootJsonFormat[ReplicaAnnotation] { | ||
// Not sure if we ever write this out, but if we do, this will let us write out exactly what we took in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we add the "writes" part only then if really need?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then we can even further simplify the case class ReplicaAnnotation
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a JsonFormat
so needs a writes
. If we're going to implement it, we might as well implement it right
References #1302
Adds a config setting
akka.rollingupdate.kubernetes.revision-annotation
to allow configurability (default is the prior behavior). From there it's just dealing with Spray JSON. Admittedly it's been a while (ever?) since I've done Spray JSON trickery, but (with apologies to Tolstoy) "all happy typeclass-and-AST JSON libraries are alike".I don't have a k8s cluster handy to test, mind.